<?php

namespace App\Services\IdentityOcr;

use App\Services\IdentityOcr\Drivers\JunziqianIdentityOcrVerifier;
use App\Services\IdentityOcr\Drivers\LogIdentityOcrVerifier;
use Illuminate\Support\Manager;
use Psr\Log\LoggerInterface;

class IdentityOcrVerifierManager extends Manager
{
    public function getDefaultDriver()
    {
        return $this->config->get('identity-ocr.default', 'log');
    }

    protected function createLogDriver(): IdentityOcrVerifier
    {
        return new LogIdentityOcrVerifier();
    }

    protected function createJunziqianDriver(): IdentityOcrVerifier
    {
        $config = $this->config->get('identity-ocr.drivers.junziqian', []);

        return new JunziqianIdentityOcrVerifier($config);
    }
}
